package com.isunland.managesystem.ui;

import android.widget.BaseAdapter;
import com.isunland.managesystem.R;
import com.isunland.managesystem.adapter.LocaleWorkCropInfoSubAdapter;
import com.isunland.managesystem.base.BaseVolleyActivity;
import com.isunland.managesystem.common.ApiConst;
import com.isunland.managesystem.entity.LocaleWorkCropInfoSub;
import com.isunland.managesystem.entity.LocaleWorkCropInfoSubListOriginal;
import com.isunland.managesystem.entity.SimpleListParams;
import com.isunland.managesystem.utils.MyStringUtil;
import com.isunland.managesystem.utils.ParamsNotEmpty;
import java.util.ArrayList;

/**
 * 对象功能:
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: wangyanan
 * 创建时间: 2017/4/13 15:44
 */
public class LocaleWorkCropInfoSubListFragment extends SimpleListFragment<LocaleWorkCropInfoSub> {

  @Override protected BaseAdapter initAdapter(BaseVolleyActivity context,
      ArrayList<LocaleWorkCropInfoSub> list) {
    return new LocaleWorkCropInfoSubAdapter(context, list);
  }

  @Override protected SimpleListParams initParams() {
    SimpleListParams params = new SimpleListParams();
    params.setClassDetailActivity(LocaleWorkCropInfoSubDetailActivity.class);
    params.setClassOriginal(LocaleWorkCropInfoSubListOriginal.class);
    params.setUrl(ApiConst.URL_QUERY_LIST_LOCALE_WORK_CROP_INFO_SUB);
    params.setParamsNotEmpty(new ParamsNotEmpty().put("mainId", mBaseParams.getId()));
    params.setTitle(MyStringUtil.connect(R.string.localeWorkCropInfoSub, R.string.list));
    params.setDataStaus(mBaseParams.getDataStatus());
    return params;
  }
}
